<!--
 * @Description: 
 * @Author: shilinzhou
 * @Date: 2024-02-02 10:18:45
 * @LastEditors: James324
 * @LastEditTime: 2024-03-26 15:20:09
-->
<script setup lang="ts">
import { tableConfig } from './config/table-config';
import { searchConfig } from './config/search-config';
import { doProcessDetail } from '@/api/demand/schedule-detail/index';

defineOptions({
    name: 'ProcessDetail'
});

const tableRef = ref<TableRef>();
const searchRef = ref<SearchRef>();
const route = useRoute();

const orderNumber = computed(() => {
    return route.query.orderNumber;
});
const materialCode = computed(() => {
    return route.query.materialCode;
});
const materialName = computed(() => {
    return route.query.materialName;
});
</script>

<template>
    <q-page>
        <q-page-title class="page-title">
            <span> 物料编码: {{ materialCode }} </span>
            <span class="m-l-8 m-r-8"> 物料名称: {{ materialName }} </span>
            <span> 订单号: {{ orderNumber }} </span>
        </q-page-title>

        <base-search ref="searchRef" :table-ref="tableRef" :searchConfig="searchConfig" />

        <base-table
            ref="tableRef"
            :tableConfig="tableConfig"
            :getDataFn="doProcessDetail"
            :added-params="$route.query"
            :hide-del="true"
            :close-edit="true"
            :un-action="true"
        >
        </base-table>
    </q-page>
</template>

<style scoped lang="scss">
@include b(page-title) {
    position: relative;
    top: -16px;
    text-align: justify;
}
</style>
